Added check on audio file duration when playing